import request from '@/utils/request'

// 添加商品
export const addGood = function (data) {
    return request({
        url: '/good/add',
        method: 'post',
        data
      })
}

// 分页获取商品
export const getPageGood = function (data) {
  return request({
      url: '/good/page',
      method: 'post',
      data
    })
}
// 获取商品总数
export const getgoodCount = function () {
  return request({
    url: '/good/count',
    method : 'get'
  })
}

//修改商品
export const updateGood = function (data) {
  return request({
    url: '/good/update',
    method: 'post',
    data
  })
}


//删除Good的商品
export const deleteGood = function (id) {
  return request({
    url: '/good/delete/'+id,
    method: 'get',
  })
}

